Skip to main content

Create Manual Backup

This API creates a manual backup of the selected scopes and stores it at the specified location. The API returns the backup ID and the encryption key used to restore the backup.

Endpoint Details

URL/v1/backup/create
MethodPOST
AuthorizationBearer Token

Request Headers

HeaderTypeDescription
Content-TypeStringMust be application/json

Request Body

Use the following format to make a request:

JSON Request
{
"file_name": "dummy",
"description": "",
"scopes": [
1,
2
],
"destination_type": 1,
"local_path": "/tmp/backups/",
"s3_config": {
"bucket_name": "",
"region": "",
"access_key_id": "",
"secret_access_key": "",
"path_prefix": ""
}
}


Parameters

ParameterTypeDescription
file_nameStringName of the backup file
descriptionStringOptional description of the backup
scopesArrayList of scope codes to include in the backup
destination_typeIntegerType of destination where the backup file is stored
local_pathStringLocal path where the backup file is stored, used for local disk destinations
s3_configObjectS3 destination configuration, used for S3 destinations
bucket_nameStringName of the S3 bucket where the backup file is stored
regionStringRegion of the S3 bucket
access_key_idStringAccess key ID used to authenticate to S3
secret_access_keyStringSecret access key used to authenticate to S3
path_prefixStringPath prefix applied to the backup file within the bucket

Response

Here is an example response after the request has been successfully processed:

Response
{
"backup_id": "f614f86f-3011-4ba7-99cc-db0ba9632c0e",
"encryption_key": "/zrndJiXfqIyH0+95HqCHtZ9WcyQV46oZkk4oRpgRVY="
}

Field Descriptions

FieldTypeDescription
backup_idUUIDUnique identifier of the created backup
encryption_keyStringEncryption key used to restore the backup file

info
  • A valid Bearer Token is required to access this endpoint.
  • The scopes array specifies which data scopes are included in the backup. Supported scope codes are:
    • 1 = System Configuration
    • 2 = Keys
    • 3 = Audit Log
    • 4 = System Log
  • The destination_type determines where the backup file is stored:
    • 1 = Local disk — stores the backup file directly on the server's local storage. Provide the local_path value.
    • 3 = S3 — stores the backup in an Amazon S3-compatible object storage. Provide the s3_config object.
  • Only the fields relevant to the selected destination_type need to be filled. The unused destination fields can be left empty.
  • The encryption_key is returned only once at creation time and is required to restore the backup. Store it securely, as it cannot be retrieved again.